package org.boot.easyapi.core.service.api;

import org.boot.easyapi.pojo.web.PageResult;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;


public interface ApiService {

    Long insert(String table, Map<String, Object> param);

    int[] insertBatch(String table, List<Map<String, Object>> params);

    Integer update(String table, Map<String, Object> param);

    List<Integer> updateBatch(String table, List<Map<String, Object>> param);

    Integer delete(String table, Long id);

    int[] deleteBatch(String table, List<Long> ids);

    Map<String, Object> get(String table, Object id, String respKey);

    List<Map<String, Object>> list(String table, Map<String, Object> param);

    PageResult<Map<String, Object>> page(String table, Map<String, Object> param);

    byte[] exportExcel( String table, Long configId, Map<String, Object> params);

    String importExcel(String table, Long configId, MultipartFile file);
}
